package com.sunlands.qdcy.tongzhuo.util;

/**
 * Redis 分布式锁接口
 *
 * @author Leaves
 * @version 1.0.0
 * @date 2018/8/8
 */
public interface IRedisDistributedLock {

    boolean lock(String key);

    boolean lock(String key, long waitMillis);

    boolean lock(String key, long waitMillis, long sleepMillis);

    boolean lock(String key, long expire, long waitMillis, long sleepMillis);

    boolean lock(String key, long expire, long waitMillis, long sleepMillis, int retries);

    boolean release(String key);
}